let a = new Set([1, 2, 3]);
let b = new Set([4, 3, 2]);
//数组去重
let arr = [12,43,23,43,68,12];
let item2 = new Set(arr);
console.log(item2);

let item = Array.from(new Set(arr));
console.log(item);



let item1 = [...new Set(arr)];

console.log(item1);
// 并集
let union = new Set([...a, ...b]);

// 交集
let intersect = new Set([...a].filter(x => b.has(x)));

// 差级
let difference = new Set( [...a].filter(x => !b.has(x)));
